<!DOCTYPE html>
<html lang="en">

{{ template "head.tpl.html" . }}

<body class="relative bg-background text-muted p-4 pt-10 flex flex-col min-h-screen max-w-screen-lg mx-auto justify-center">

{{ template "header.tpl.html" . }}

{{ template "alerts.tpl.html" . }}

{{ template "login-btn.tpl.html" . }}

<main class="mt-10 px-4 md:px-10 lg:px-24 grow flex justify-center w-full">
    <div class="flex flex-col text-white">
        {{ if and .Newsbox .Newsbox.Text }}
        <div class="mb-14 -mt-4 newsbox newsbox-{{ .Newsbox.Type }}">
            {{ .Newsbox.Text | htmlSafe }}
        </div>
        {{ end }}

        <h1 class="text-8xl font-semibold antialiased text-center mb-10 leading-snug">Keep Track of<br><span
                class="text-accent">Your</span> Coding Time</h1>
        <p class="text-center text-secondary text-xl my-2">Wakapi is an open-source tool that helps you keep track of the
            time you have spent coding on different projects in different programming languages and more.<br>Ideal for
            statistics freaks and anyone else.</p>

        <div class="flex justify-center mt-8 mb-4 space-x-2">
            <a href="setup">
                <button type="button"
                        class="btn-primary"><span class="iconify inline" data-icon="ion:rocket"></span> Let's Go!
                </button>
            </a>
            <a href="https://github.com/muety/wakapi#%EF%B8%8F-how-to-use" target="_blank" rel="noopener noreferrer">
                <button type="button" class="btn-default"><span class="iconify inline" data-icon="heroicons-solid:server"></span> Get Your Own
                </button>
            </a>
            <a href="https://github.com/sponsors/muety" target="_blank" rel="noopener noreferrer">
                <button type="button" class="btn-default"><span class="iconify inline" data-icon="bx:bxs-heart"></span> Support Us
                </button>
            </a>
            <a href="https://github.com/muety/wakapi" target="_blank" rel="noopener noreferrer">
                <button type="button" class="btn-default">
                    <span class="iconify inline text-white" data-icon="codicon:github-inverted"></span>
                </button>
            </a>
        </div>

        <p class="text-center text-secondary text-md mt-4 mb-4">
            This system has tracked a total of </span>
            {{ range $d := .TotalHours | printf "%d" | toRunes }}
            <span class="bg-background rounded-sm p-1 border border-muted/50 font-mono text-secondary" style="margin: auto -1px;" title="{{ $.TotalHours }} hours (updated every hour)">{{ $d }}</span>
            {{ end }}
            <span class="mx-1">hours of coding from</span>
            {{ range $d := .TotalUsers | printf "%d" | toRunes }}
            <span class="bg-background rounded-sm p-1 border border-muted/50 font-mono text-secondary" style="margin: auto -1px;" title="{{ $.TotalUsers }} users (updated every hour)">{{ $d }}</span>
            {{ end }}
            <span class="ml-1">users.</span>
        </p>

        <div id="online-indicator" class="text-center text-secondary text-md font-semibold flex justify-center items-center gap-2">
            <div class="live-indicator"></div>
            <span>{{ .CurrentlyOnline }} currently active users</span>
        </div>

        <div class="flex justify-center my-8">
            <img alt="App screenshot" src="assets/images/screenshot.webp" width="800px" height="513px" loading="lazy">
        </div>

        <div class="flex flex-col items-center mt-10">
            <h2 class="font-semibold text-3xl text-white m-0">Features</h2>
            <div class="mt-4 text-lg text-secondary">
                <ul>
                    <li><span class="iconify inline text-accent" data-icon="eva:checkmark-circle-2-fill"></span> &nbsp; 100 % free and open-source</li>
                    <li><span class="iconify inline text-accent" data-icon="eva:checkmark-circle-2-fill"></span> &nbsp; Built by developers for developers</li>
                    <li><span class="iconify inline text-accent" data-icon="eva:checkmark-circle-2-fill"></span> &nbsp; Fancy statistics and plots</li>
                    <li><span class="iconify inline text-accent" data-icon="eva:checkmark-circle-2-fill"></span> &nbsp; Public leaderboards</li>
                    <li><span class="iconify inline text-accent" data-icon="eva:checkmark-circle-2-fill"></span> &nbsp; Cool badges for readmes</li>
                    <li><span class="iconify inline text-accent" data-icon="eva:checkmark-circle-2-fill"></span> &nbsp; Weekly e-mail reports</li>
                    <li><span class="iconify inline text-accent" data-icon="eva:checkmark-circle-2-fill"></span> &nbsp; Intuitive REST API</li>
                    <li><span class="iconify inline text-accent" data-icon="eva:checkmark-circle-2-fill"></span> &nbsp; Compatible with <a href="https://wakatime.com" target="_blank" rel="noopener noreferrer" class="hover:text-foreground">Wakatime</a></li>
                    <li><span class="iconify inline text-accent" data-icon="eva:checkmark-circle-2-fill"></span> &nbsp; <a href="https://prometheus.io" target="_blank" rel="noopener noreferrer" class="hover:text-foreground">Prometheus</a> metrics</li>
                    <li><span class="iconify inline text-accent" data-icon="eva:checkmark-circle-2-fill"></span> &nbsp; Lightning fast</li>
                    <li title="Wakapi.dev is hosted in Germany, none of your data will leave the EU"><span class="iconify inline text-accent" data-icon="eva:checkmark-circle-2-fill"></span> &nbsp; GDPR-compliant</li>
                    <li><span class="iconify inline text-accent" data-icon="eva:checkmark-circle-2-fill"></span> &nbsp; Self-hosted</li>
                </ul>
            </div>
        </div>

        <div class="flex justify-center space-x-2 mt-12">
            <img alt="License badge" loading="lazy"
                 src="https://badges.fw-web.space/github/license/muety/wakapi?color=%232F855A&style=flat-square">
            <img alt="Go version badge" loading="lazy"
                 src="https://badges.fw-web.space/github/go-mod/go-version/muety/wakapi?color=%232F855A&style=flat-square">
            <img alt="Wakapi coding time badge" loading="lazy"
                 src="https://badges.fw-web.space/endpoint?color=%232F855A&style=flat-square&label=wakapi&url=https://wakapi.dev/api/compat/shields/v1/n1try/interval:any/project:wakapi">
        </div>
    </div>
</main>

{{ template "footer.tpl.html" . }}

{{ template "foot.tpl.html" . }}
</body>

</html>
